<template>
  <a-result
      status="success"
      title="下单成功"
      sub-title="商家正在准备美味，请耐心等待"
  >
    <template #extra>
      <a :href="'/#/order?orderID='+toOrderID">
        <a-button type="primary">
          查看订单
        </a-button>
      </a>
      <a href="/#/">
        <a-button>
          返回首页
        </a-button>
      </a>
    </template>
  </a-result>
</template>

<script>
import {notification} from "ant-design-vue";

export default {
name: "Confirmed",
  created() {
    if(this.$route.query.orderID==undefined) {
      notification.open({
        message:'非法的页面请求',
        description:"无参数的下单成功页面"
      })
      window.location='/#/'
      return
    }
  },
  computed:{
  toOrderID:function (){
    return this.$route.query.orderID
  }
  }
}
</script>

<style scoped>

</style>